#ifndef COMPONENTLISTWIDGET_H
#define COMPONENTLISTWIDGET_H

#include <QMainWindow>
#include <QListWidgetItem>
#include <QIcon>
#include <QFont>
#include <QStyle>

struct Group
{
    QListWidgetItem* header;
    QList<QListWidgetItem*> children;
    bool isExpanded;
};

class ComponentListWidget : public QListWidget
{
public:
    ComponentListWidget(QWidget* parent = nullptr);

protected:
    void startDrag(Qt::DropActions supportedActions) override;

public slots:
    void onItemClicked(QListWidgetItem* item);

private:
    void initUI();
    void setupGroups();
    QList<Group> m_groups;
};

#endif // COMPONENTLISTWIDGET_H
